// index.js
import {reqIndexData} from '../../api/index'
import {toast,modal} from '../../utils/extendApi'
import instance from '../../utils/http'
Page({
  data: {
    bannerList:[],
    category:[],
    advertisement:[],
    firstGoods:[],
    recommendGoods:[],
  },
  onShow(){
  },
  onLoad(){
    this.getData()
  },
  // 接口请求方法
  async getData(){
    let res =  await reqIndexData()
    this.setData({
      bannerList:res[0].data,
      category:res[1].data,
      advertisement:res[2].data,
      firstGoods:res[3].data,
      recommendGoods:res[4].data,
    })
  },
})
